package com.centaline.androidsalesblog.activities.mine;

import android.content.Intent;
import android.support.v7.widget.AppCompatTextView;
import android.view.View;

import com.centaline.androidsalesblog.BuildConfig;
import com.centaline.androidsalesblog.R;
import com.centaline.androidsalesblog.base.BaseActivity;

/**
 * 关于我们
 */
public class AboutUsActivity extends BaseActivity implements View.OnClickListener {

    private AppCompatTextView atv_version;

    @Override
    protected int setLayoutId() {
        return R.layout.activity_about_us;
    }

    @Override
    protected void findViews() {
        setUniversalToolbar(R.string.title_about_us);
        atv_version = (AppCompatTextView) findViewById(R.id.atv_version);
    }

    @Override
    protected void initViews() {
        final String versionName = BuildConfig.VERSION_NAME;
        atv_version.setText(new StringBuilder()
                .append(getString(R.string.app_name))
                .append(" V")
                .append(versionName));
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.rl_introduce:
                startActivity(new Intent(this, IntroductionActivity.class));
                break;
            default:
                break;
        }
    }
}
